The present invention relates to memory caching, in particular, to delete information with a low access frequency from a cache memory to secure an available space in the cache memory, so called xe2x80x9caging processxe2x80x9d for deleting aged-out entries.
xe2x80x9cCachingxe2x80x9d is a technique of improving the data access speed by transferring frequently used information from a main memory (=inexpensive, vast free memory capacity at low speed) to a cache memory (=high speed, but expensive and very limited in free memory capacity) and storing the information in the cache memory. Caching is generally utilized in routing entries in computers and routers.
Aged out entries are processed to effectively use the cache memory. During the process, data having low frequency of use is removed from an entry register. Decision as to whether the concerned frequency is high or low results from checking the hit history for every entry and retrieving an entry having no hit after a certain amount of time elapses, i.e., an entry that has aged out. Hereinafter, this history check is referred to as the xe2x80x9centry checkxe2x80x9d.
Conventional entry checks have been performed by software. This caused the problem of a heavy load imposed on a processor to run the software. Furthermore, it was difficult to raise the speed because of the software execution.
It is an object of the invention to provide a content-addressable memory device equipped with hardware to perform entry checks.
According to the invention, a content-addressable memory device with multiple WORD lines comprises:
a first memory block to store whether there is a hit during current time period;
a second memory block to store whether there is a hit during a period preceding the current time period, the first and second memory blocks being provided for each WORD line; and
means for selecting a WORD line to determine a WORD line to be aged out based on a value stored in the first and second memory blocks.